<!DOCTYPE HTML>
<html lang="en-US">
<head>
    <meta charset="UTF-8">
    <title>home</title>
    <link rel="stylesheet" href="http://a.tbcdn.cn/s/kissy/1.1.6/cssreset/reset-min.css" />
    <link rel="stylesheet" href="/svn/assets/game/css/bargame.css" />
    <script type="text/javascript" src="http://a.tbcdn.cn/s/kissy/1.1.6/kissy-min.js"></script>
    <script type="text/javascript" src="/svn/assets/game/js/src/app.js"></script>
</head>

<body>
    <div class="room" id="room">
        <ul class="players">
            <li class="player p1"><span class="pn">waitting</span></li>
            <li class="player p2"><span class="pn">waitting</span></li>
        </ul>
        
        <div class="cc">
            <canvas id="J_Screen" class="table" width="800" height="600"></canvas>
        </div>
        
        <div class="actions">
            <button class='btn blue' id="J_ready_button" disabled="disabled">ready</button>
        </div>
        
        <div class="about">
            目前，本游戏需要浏览器对 Websoket 和 Canvas 的支持 <a href="?logout">登出</a>
            <a href="javascript:void(0);" id="cheat" >cheat</a>
        </div>
    </div>
    <script type="text/javascript">
        Pingpo.use("pp~game", function(P){
                var S = KISSY,
                    canvas = !!S.DOM.get("#J_Screen").getContext,
                    audio = typeof Audio,
                    websoket = typeof WebSoket;
                if(canvas && audio && websoket){
                    new P.Game({
                            wsurl : P.Config.wsserver
                    });
                }else{
                    alert("浏览器必须支持以下特性\n"+
                        "\t特性\t是否支持\n"+
                        "\tcanvas\t"+canvas+"\n"+
                        "\taudio\t"+audio+"\n"+
                        "\twebsoket\t"+websoket+"\n");
                }
        });
    </script>
</body>
</html>
